#include <QtCore/QTextStream>
#include <QtCore/QFile>
#include <iostream>
#include <cstdint>
#include <ctime>

int main(int argc,char* argv[]){
  setlocale(LC_ALL,"");
  srand(static_cast<unsigned int>(std::time(NULL)));
  QFile data("output.txt");
  std::int64_t sum=0;
  if (data.open(QFile::ReadOnly)) {
    QTextStream input(&data);
    while(!input.atEnd()){
      QString qs=input.readLine();
      int value=qs.toInt();
      sum+=value;
    }
  }
  data.close();
  std::cout<<"result="<<sum<<std::endl;
  return 0;
}
